package com.subframe7536.UserInfo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.subframe7536.UserInfo.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 用户 Mapper 接口
 * </p>
 *
 * @author subframe7536
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Select("SELECT\n" +
        "\tu.user_id \n" +
        "FROM\n" +
        "\te_user u,\n" +
        "\te_user_login ul \n" +
        "WHERE\n" +
        "\tu.user_id = ul.user_id \n" +
        "\tAND phone = #{phone}")
    String getUserIdByPhone(@Param("phone") String phone);

}
